import {formatDate} from "../../../../hrpub/common/utils/utils";
import config from "../config";
import React from "react";

export default function addTemplate(template, lang) {
    template['gather_list'] = {
        "moduletype": "table",
        "pagination": false,
        "code": "gather_list",
        "name": "按人汇总",
        "oid": "100DZ710000000001HMD",
        items: [
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'staffcode',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000018'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "fixed": "left"
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'staffname',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000014'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "fixed": "left"
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "200px",
                "attrcode": 'orgname',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000025'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "200px",
                "attrcode": 'deptname',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000026'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "200px",
                "attrcode": 'lastOtDateStr',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000027'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "200px",
                "attrcode": 'totalHoursNormal',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "number",
                "label": lang['hrkq-0000028'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "2",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "200px",
                "attrcode": 'totalHoursRest',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "number",
                "label": lang['hrkq-0000029'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "2",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "200px",
                "attrcode": 'totalHoursHoliday',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "number",
                "label": lang['hrkq-0000030'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "2",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "200px",
                "attrcode": 'totalHours',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "number",
                "label": lang['hrkq-0000031'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "2",
                "visible": true
            }
        ]
    }
    template['gather_form'] = {
        "moduletype": "form",
        "pagination": false,
        "code": "gather_form",
        "name": lang['hrkq-0000017'],
        "oid": "100DZ710000000001HMH",
        items: [
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'staffcode',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000018'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "fixed": "left"
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'staffname',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000014'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "fixed": "left"
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "200px",
                "attrcode": 'orgname',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000025'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "200px",
                "attrcode": 'deptname',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000026'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "200px",
                "attrcode": 'lastOtDateStr',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000027'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "200px",
                "attrcode": 'totalHoursNormal',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000028'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "200px",
                "attrcode": 'totalHoursRest',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000029'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "200px",
                "attrcode": 'totalHoursHoliday',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000030'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "200px",
                "attrcode": 'totalHours',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000031'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true
            }
        ]
    }
    template['details_list'] = {
        "moduletype": "table",
        "pagination": false,
        "code": "details_list",
        "name": "加班明细",
        "oid": "100DZ710000000002HMF",
        items: [
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'staffcode',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000018'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "fixed": "left"
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'staffname',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000014'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "fixed": "left"
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'orgname',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000025'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'deptname',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000026'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'overtimetypename',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000032'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "300px",
                "attrcode": 'overtimerange',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000033'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "renderStatus": "browse",
                "render": (text, row, index) => {
                    if (row.values['overtimebegintime'] && row.values['overtimebegintime'].value &&
                        row.values['overtimeendtime'] && row.values['overtimeendtime'].value) {
                        return (<div>
                            <span>{formatDate(row.values['overtimebegintime'].value, '', 'Y-M-d h-m-s')}</span>
                            <span style={{margin: '0 10px'}}>{lang['hrkq-0000067']}</span>
                            <span>{formatDate(row.values['overtimeendtime'].value, '', 'Y-M-d h-m-s')}</span>
                        </div>);
                    }
                }
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "140px",
                "attrcode": 'overtimelen',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "number",
                "label": lang['hrkq-0000034'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "2",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "140px",
                "attrcode": 'actuallen',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "number",
                "label": lang['hrkq-0000035'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "2",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "300px",
                "attrcode": 'otsignrange',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000036'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "renderStatus": "browse",
                "render": (text, row, index) => {
                    if (row.values['otsignbegintime'] && row.values['otsignbegintime'].value &&
                        row.values['otsignendtime'] && row.values['otsignendtime'].value) {
                        return (<div>
                            <span>{formatDate(row.values['otsignbegintime'].value, '', 'Y-M-d h-m-s')}</span>
                            <span style={{margin: '0 10px'}}>{lang['hrkq-0000067']}</span>
                            <span>{formatDate(row.values['otsignendtime'].value, '', 'Y-M-d h-m-s')}</span>
                        </div>);
                    }
                }
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'billsource',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000024'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "renderStatus": "browse",
                "render": (text, row, index) => {
                    if (text && text.value && config['billsource'][text.value]) {
                        return (<span>{lang[config['billsource'][text.value].i18n]}</span>);
                    }
                }
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'applydate',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000037'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "renderStatus": "browse",
                "render": (text, row, index) => {
                    if (text && text.value) {
                        return (<span>{formatDate(text.value)}</span>);
                    }
                }
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'billstatus',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000038'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "renderStatus": "browse",
                "render": (text, row, index) => {
                    if (text && text.value && config['approvestatus'][text.value]) {
                        return (<span>{lang[config['approvestatus'][text.value].i18n]}</span>);
                    }
                }
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'transferflag',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000039'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "renderStatus": "browse",
                "render": (text, row, index) => {
                    if (text && text.value !== 2 &&
                        config['transferflag'][text.value]) {
                        return (<span>{lang[config['transferflag'][text.value].i18n]}</span>);
                    }
                }
            },
        ]
    }
    template['details_form'] = {
        "moduletype": "form",
        "pagination": false,
        "code": "details_form",
        "name": lang['hrkq-0000017'],
        "oid": "100DZ710000000002HMG",
        items: [
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'staffcode',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000018'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "fixed": "left"
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'staffname',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000014'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "fixed": "left"
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'orgname',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000025'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'deptname',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000026'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'overtimetypename',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000032'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "300px",
                "attrcode": 'overtimerange',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000033'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "renderStatus": "browse",
                "render": (text, row, index) => {
                    if (row['overtimebegintime'] && row['overtimebegintime'].value &&
                        row['overtimeendtime'] && row['overtimeendtime'].value) {
                        return (<div>
                            <span>{formatDate(row['overtimebegintime'].value, '', 'Y-M-d h-m-s')}</span>
                            <span style={{margin: '0 10px'}}>{lang['hrkq-0000067']}</span>
                            <span>{formatDate(row['overtimeendtime'].value, '', 'Y-M-d h-m-s')}</span>
                        </div>);
                    }
                }
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "140px",
                "attrcode": 'overtimelen',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000034'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "140px",
                "attrcode": 'actuallen',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000035'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "300px",
                "attrcode": 'otsignrange',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000036'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "renderStatus": "browse",
                "render": (text, row, index) => {
                    if (row['otsignbegintime'] && row['otsignbegintime'].value &&
                        row['otsignendtime'] && row['otsignendtime'].value) {
                        return (<div>
                            <span>{formatDate(row['otsignbegintime'].value, '', 'Y-M-d h-m-s')}</span>
                            <span style={{margin: '0 10px'}}>{lang['hrkq-0000067']}</span>
                            <span>{formatDate(row['otsignendtime'].value, '', 'Y-M-d h-m-s')}</span>
                        </div>);
                    }
                }
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'billsource',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000024'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "renderStatus": "browse",
                "render": (text, row, index) => {
                    if (text && text.value && config['billsource'][text.value]) {
                        return (<span>{lang[config['billsource'][text.value].i18n]}</span>);
                    }
                }
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'applydate',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000037'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "renderStatus": "browse",
                "render": (text, row, index) => {
                    if (text && text.value) {
                        return (<span>{formatDate(text.value)}</span>);
                    }
                }
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'billstatus',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000038'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "renderStatus": "browse",
                "render": (text, row, index) => {
                    if (text && text.value && config['approvestatus'][text.value]) {
                        return (<span>{lang[config['approvestatus'][text.value].i18n]}</span>);
                    }
                }
            },
            {
                "hyperlinkflag": false,
                "islock": false,
                "istotal": false,
                "width": "120px",
                "attrcode": 'transferflag',
                "color": "#6E6E77",
                "containlower": false,
                "datatype": "1",
                "disabled": true,
                "editAfterFlag": false,
                "fieldDisplayed": "refcode",
                "fieldValued": "refpk",
                "isDataPowerEnable": true,
                "isnotmeta": false,
                "isResLabel": false,
                "isrevise": false,
                "isShowUnit": false,
                "itemtype": "input",
                "label": lang['hrkq-0000039'],
                "maxlength": "40",
                "onlyLeafCanSelect": false,
                "position": "1",
                "required": false,
                "scale": "0",
                "visible": true,
                "renderStatus": "browse",
                "render": (text, row, index) => {
                    if (text && text.value !== 2 &&
                        config['transferflag'][text.value]) {
                        return (<span>{lang[config['transferflag'][text.value].i18n]}</span>);
                    }
                }
            },
        ]
    }
}